<template>
  <el-card>
    <el-alert
      title="共100条数据"
      type="info"
      :closable="false"
      show-icon
    ></el-alert>
    <el-table :data="tableData" border style="width: 100%">
      <el-table-column
        align="center"
        prop="type"
        label="操作类型"
        width="500"
      
      ></el-table-column>
      <el-table-column
        align="center"
        prop="pepole"
        label="操作人"
        width="400"
      ></el-table-column>
      <el-table-column
        align="center"
        prop="result"
        label="执行结果"
        width="400"
      ></el-table-column>
      <el-table-column
        align="center"
        prop="time"
        label="操作时间"
        width="200"
      ></el-table-column>
      <el-table-column
        align="center"
        prop="describe"
        label="描述"
        width="300"
      ></el-table-column>
    </el-table>

    <el-pagination
      background
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
      :current-page="page.page"
      :page-sizes="[2, 4, 6, 8, 10]"
      :page-size="page.pagesize"
      layout="total, sizes, prev, pager, next, jumper"
      :total="counts"
     
    ></el-pagination>
  </el-card>
</template>

<script>
const defaultItem = {
  type: 'CN',
  pepole: '能杰',
  result: '红要达七证象有写形响标广科联这成科一。',
  time: '1997-11-13 06:12:22',
  describe: '51.19',
}
export default {
  created(){
    this.getTable()
  },
  methods: {
   getTable(){
      for(let i=0;i<this.pagesize;i++){;
        this.tableData.push(defaultItem)
      }
    },
     async  handleSizeChange(val) {
       this.tableData=[]
      this.pagesize = val
      await this.getTable()
      // this.getUsersList()
    },
    handleCurrentChange(val) {
      this.page = val
    },
  },
  
  data() {
    return {
      tableData: [],
      page: 1, //当前页码
      counts: 100, //总数
      pagesize: 10,
       currentPage4: 4
    }
  },
 
}
</script>
<style scoped></style>
